var e;

require('@babel/runtime/helpers/Arrayincludes'),
  App({
    onLaunch: function () {
      this.autoUpdate();
      var e = wx.getStorageSync('logs') || [];
      e.unshift(Date.now()),
        wx.setStorageSync('logs', e),
        console.log('接口地址等', this.globalData),
        wx.login({
          success: function (e) {},
        });
    },
    globalData: {
      wxapi:
        'https://apis.map.qq.com/ws/geocoder/v1/?key=UBSBZ-L6C3T-OQ7XQ-VPEXT-UYEQK-HSFYD&location=',
      wxapi1:
        'https://apis.map.qq.com/ws/direction/v1/driving/?key=UBSBZ-L6C3T-OQ7XQ-VPEXT-UYEQK-HSFYD',
      url: 'https://qingsheng.xudongfang.com',
      appUrl: 'http://150.158.105.159:8080', // https://qingsheng.xudongfang.com/api"
    },

    autoUpdate: function () {
      if (wx.canIUse('getUpdateManager')) {
        var e = wx.getUpdateManager();
        e.onCheckForUpdate(function (t) {
          t.hasUpdate &&
            (e.onUpdateReady(function () {
              wx.showModal({
                title: '更新提示',
                content: '新版本已经准备好，是否重启应用？',
                success: function (t) {
                  t.confirm && e.applyUpdate();
                },
              });
            }),
            e.onUpdateFailed(function () {
              wx.showModal({
                title: '更新提示',
                content: '新版本下载失败，请稍后再试。',
              });
            }));
        });
      }
    },
  }),
  (e = Page),
  (Page = function (t) {
    var n = '';
    wx.onAppRoute(function (e) {
      var t = getCurrentPages(),
        a = t[t.length - 1];
      n = a.route;
    }),
      (t = Object.assign(
        {
          onShareAppMessage: function () {
            var e = {};
            return (
              n.includes(['index/index']) ||
                (e = {
                  title: '收运处一体化',
                  imageUrl: wx.getStorageSync('shareUrl'),
                }),
              e
            );
          },
        },
        t
      )),
      e(t);
  });
